This invention relates to improvements in encoders, especially rotary encoders, to methods of determining the position of an object using a rotary encoder, and to steering systems for vehicles that incorporate rotary encoders.
It is known to provide an encoder which comprises a track of magnetic elements arranged in an alternating sequence of North and South poles, and a detector which produces an output signal having a first state when proximal to one of the north poles and a second state when opposite one of the south poles. This, as the track moves past the detector the output of the detector will be a modulated signal which alternates between the first and second states.
An encoder with one detector is limited in use as it is not possible to tell which direction the track is moving. This can be overcome by using two detectors, offset from one another by an amount that is less then the spacing between centre of a north pole and the centre of an adjacent south pole. This is shown in FIGS. 2 and 3 of the accompanying drawings. The two detectors are typically identical, each producing an alternating sequence of first and second states as the track moves but with the two patterns offset from one another.
The combined values of the two outputs from the detectors will pass through four states, as shown by the state machine in FIG. 7 of the drawings, and by identifying the states before and after the latest change of state it is possible to identify the direction in which the track is rotating. Each change of state will occur as the detector crosses an edge where two adjacent poles meet. If the magnetic poles are all equal length these edges will be evenly spaced apart around the track, and if the detectors are spaced apart by an angle equal to half of the spacing between pole centres the states will change at regular, equally spaced, time intervals, when the track rotates at a constant velocity. The velocity can therefore be determined from the elapsed time between each change in state.
The change of state will not, by itself, uniquely identify the position of the encoder track if the track has many poles which will always be the case in a practical encoder. Over one full rotation, a given change of state will occur multiple times and this will be repeated on further revolutions of the encoder. However, by counting the changes in state, it is also possible to produce a position signal relative to a known datum position.
It is known that encoders of this form suffer from inaccuracies if the spacing between the magnets is not ideal or if external influences such as other magnets, cause distortion in the magnetic fields emitted by the magnets as seen by the detectors. Variations in the switching threshold of the detectors can also lead to inaccuracies. This can lead to small shifts in the position at which the combined output signals change state away from the expected positions. For example, in the case where the changes should occur at equal time intervals when the track is rotating at a constant velocity as described above, the error can lead to different timings between the changes in state as the changes occur at positions that are offset from the ideal expected positions.
The applicant has found that such shifts in the position of the changes of state of a rotating encoder track can lead to the presence of unwanted harmonic frequencies in the position signal output from the encoder. For example, where the encoder track comprises an annular disc of 36 magnets, rotating at a constant angular velocity, a noise component of the 36th order may be observed. When the position signal is being used in a sensitive application, such as within the control loop of a motor control circuit for a motor of an electric power assisted steering system, this noise can cause acoustic noise where the harmonic frequency interacts with the resonant frequency of a part of the motor or other part of the steering system.